package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.TreeEntity;
import org.springframework.data.annotation.Id;

/**
 * 行政区对象 sys_administrative
 * 
 * @author sw
 * @date 2025-10-19
 */
@Data
@TableName("sys_administrative")
public class SysAdministrative extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(value = "ID", type = IdType.AUTO)
    private Long administrativeId;
    /** 名称 */
    @Excel(name = "编码")
    private String administrativeCode;
    /** 名称 */
    @Excel(name = "名称")
    private String administrativeName;
    /** 名称 */
    @Excel(name = "级别")
    private String administrativeLevel;
    /** 名称 */
    @Excel(name = "图层路径")
    private String path;

    /** 负责人 */
    @Excel(name = "负责人")
    private String leader;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String phone;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    private int childNum;
    private boolean hasChildren;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("administrativeId", getAdministrativeId())
            .append("administrativeCode", getAdministrativeCode())
            .append("parentCode", getParentCode())
            .append("ancestors", getAncestors())
            .append("administrativeName", getAdministrativeName())
            .append("orderNum", getOrderNum())
            .append("leader", getLeader())
            .append("phone", getPhone())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
